package com.crawler.seed;

import com.crawler.CrawlingRule;
import com.crawler.CrawlingURL;

public class MaxDeepthCrawlingRule implements CrawlingRule {

	private int deepth;

	public int getDeepth() {
		return deepth;
	}

	public void setDeepth(int deepth) {
		this.deepth = deepth;
	}

	@Override
	public boolean shouldCrawl(CrawlingURL curl) {

		return curl.getDeepth() <= deepth;
	}

}
